home *** CD-ROM | disk | FTP | other *** search
/ PC Play 2 (Suomi) / PCPLAY2_2.ISO / play / main.dxr / 00186_UI Rollover Change Member.ls < prev    next >
Encoding:
Text File  |  1998-02-15  |  1.6 KB  |  41 lines

  1. property standardImage, alternateImage, nextCM
  2.  
  3. on mouseEnter me
  4.   set the member of sprite the spriteNum of me to the alternateImage of me
  5. end
  6.  
  7. on mouseLeave me
  8.   set the member of sprite the spriteNum of me to the standardImage of me
  9. end
  10.  
  11. on beginSprite me
  12.   puppetSprite(the spriteNum of me, 1)
  13.   set the standardImage of me to the member of sprite the spriteNum of me
  14.   if nextCM = 1 then
  15.     set memref to the member of sprite the currentSpriteNum
  16.     set castLibNum to the castLibNum of memref
  17.     set memdefault to member (the memberNum of member memref + 1) of castLib castLibNum
  18.     set alternateImage to memdefault
  19.   end if
  20. end
  21.  
  22. on endSprite me
  23.   puppetSprite(the spriteNum of me, 0)
  24. end
  25.  
  26. on getPropertyDescriptionList
  27.   if the currentSpriteNum = 0 then
  28.     set memdefault to 0
  29.   else
  30.     set memref to the member of sprite the currentSpriteNum
  31.     set castLibNum to the castLibNum of memref
  32.     set memdefault to member (the memberNum of member memref + 1) of castLib castLibNum
  33.   end if
  34.   set p_list to [#nextCM: [#comment: "Use Next Member:", #format: #boolean, #default: 1], #alternateImage: [#comment: "Rollover Cast Member:", #format: #graphic, #default: memdefault]]
  35.   return p_list
  36. end
  37.  
  38. on getBehaviorDescription
  39.   return "Change the sprite's cast member when the mouse rolls over the current sprite." & RETURN & "PARAMETERS:" & RETURN & "ΓÇó Use Next Member - Turn this option on to automatically display the next cast member in the cast when mouse rolls over the sprite." & RETURN & "ΓÇó Rollover Cast Member - Choose a specific cast member to appear when the mouse rolls over the sprite. This setting is ignored if Use Next Member is on."
  40. end
  41.